package com.sanshui.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 */
@Configuration
public class DruidConfig {
 
    @ConfigurationProperties(prefix="spring.datasource.druid") //来获取application.yml配置的属性
    @Bean
    public DruidDataSource druidDataSource(){
        return new DruidDataSource();
    }}
